<script setup lang="ts">
import { lat2str, lng2str } from '@/geom/great-circle'
import type { Waypoint } from './types'

const props = defineProps<{
  type: string
  item: Waypoint
}>()

const lng = lng2str(props.item.location.lng)
const lat = lat2str(props.item.location.lat)
</script>
<template>
  <div class="waypoint-info pane-block">
    <div class="row">
      <div class="col-4em">航路点:</div>
      <div class="col">
        {{ item.id }}
      </div>
    </div>
    <div class="row">
      <div class="col-4em">经度:</div>
      <div class="col">
        {{ lng }}
      </div>
    </div>
    <div class="row">
      <div class="col-4em">纬度:</div>
      <div class="col">
        {{ lat }}
      </div>
    </div>
  </div>
</template>
